package com.bugu.service.customer;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springside.modules.orm.Page;
import org.springside.modules.orm.hibernate.EntityManager;

import com.bugu.dao.customer.CustomerDao;
import com.bugu.entity.customer.Customer;
@Service
public class CustomerManager extends EntityManager<Customer, Long> {
	@Autowired
	private CustomerDao customerDao = null;
	public void setCustomerDao(CustomerDao customerDao) {
		this.customerDao = customerDao;
	}
	@Override
	protected CustomerDao getEntityDao() {
		// TODO Auto-generated method stub
		return customerDao;
	}
	
	public Page<Customer> findCustomerByCompanyAndUser(Page<Customer> page,Long companyId,String loginName){
		page = customerDao.findCustomerByCompanyAndUser(page, companyId, loginName);
		return page;
	}
	public Page<Customer> findCustomerByCompany(Page<Customer> page,String loginName){
		page = customerDao.findCustomerByCompany(page, loginName);
		return page;
	}


}
